package com.jiuwan.gamepass;

import com.jiuwan.gamepass.auth.JwtAuthenticationTokenFilter;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;


@MapperScan("com.jiuwan.gamepass.dao")
@SpringBootApplication
public class GamepassApplication {

    public static void main(String[] args) {
        SpringApplication.run(GamepassApplication.class, args);


    }

    static {
        System.setProperty("druid.mysql.usePingMethod","false");
    }

    @Bean
    public FilterRegistrationBean registration(JwtAuthenticationTokenFilter filter) {
        FilterRegistrationBean registration = new FilterRegistrationBean(filter);
        registration.setEnabled(false);
        return registration;
    }
}
